﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0014)about:internet -->
<html>
    <head>
        <meta content="Innovasys Document! X (http://www.innovasys.com)" name=GENERATOR>
        <!--DXMETADATA start type="MetaCharset" --><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><!--DXMETADATA end-->
        <!--DXMETADATA start type="PageItemTitle" format="<title>PropertyItemType Enumeration</title>" --><title>PropertyItemType Enumeration</title><!--DXMETADATA end-->
        <link href="stylesheets/axstylesheet.css" type=text/css rel=stylesheet>
        <script src="script/ax.js" type=text/javascript>
    </script>

    


<style>
html,div { margin: 0; padding: 0;}

body {
	padding: 0px;
	margin: 0px;
	overflow: auto;
	height: 100%;
}

#winchm_template_button{
	float: right;
	width: 93px;
	top: 7px;
	position: relative;
	text-align: right;
	right: 5px;
	height: auto;
}

#winchm_template_top{
	padding: 0px;
	margin: 0px;
	border-bottom: 1px solid #9B9B9B;
	background-color: #B1CEFE;
}

#winchm_template_navigation{
	margin: 0px;
	padding-top: 7px;
	padding-left: 7px;
	padding-bottom: 3px;
	padding-right: 0px;
	font-size: 8.5pt;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: #585858;
}

#winchm_template_title{
	margin: 0px;
	padding-top: 4px;
	padding-left: 7px;
	padding-bottom: 7px;
	padding-right: 0px;
	font-size: 18px; 
	font-family: Verdana, Geneva, sans-serif;
	color: #363636;
}

#winchm_template_content{
	margin-top: 20px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	width: auto  !important;
	width: 100%;
}

#winchm_template_footer{
	border-width: 1px;
	border-color: #B1CEFE;
	border-top-style: solid;
	margin-top: 15px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	padding-top: 7px;
	padding-left: 0px;
	padding-bottom: 0px;
	padding-right: 0px;
	font-family: arial, helvetica, sans-serif;
	font-size: 8.5pt;
	color: #696969;
	width: auto;
	text-align: left;
}


#winchm_template_container{
	margin: 0px;
	padding: 0px;
	position: static;
	padding-bottom: 3px;
	overflow: auto;
	background-color: #FFFFFF;
}


@media print
{
#winchm_template_container{
	position: static;	
	margin: 0px;
	padding: 5px;
	
	width: auto;
	height: auto;
	overflow: auto;
}
#winchm_template_button{
visibility:hidden;
}
}

#winchm_template_navigation A:link	{text-decoration: none; color:#004080}
#winchm_template_navigation A:visited  {text-decoration: none; color: #004080}
#winchm_template_navigation A:active {text-decoration: none; color: #004080 }
#winchm_template_navigation A:hover {text-decoration: none;color: #0080FF}

A:link	{text-decoration: underline; color:#0033CC}
A:visited  {text-decoration: underline; color: #0033CC}
A:active {text-decoration: underline; color: #0033CC }
A:hover {text-decoration: underline;color: #FF0000;}
</style>
<script type="text/javascript">
function isMobile(){
Agent = window.navigator.userAgent;
if (Agent.indexOf("iPhone")>=1 || Agent.indexOf("iPad")>=1 || Agent.indexOf("iPod")>=1 || Agent.indexOf("Android")>=1){
return true;
}else{
return false;	
}

}
function d_onresize(){
if (window.navigator.userAgent.indexOf("MSIE")>=1){
document.getElementById('winchm_template_container').style.pixelWidth = document.body.offsetWidth - 3;
document.getElementById('winchm_template_container').style.pixelHeight = document.body.offsetHeight - document.getElementById('winchm_template_top').offsetHeight - 4;
}
document.getElementById('winchm_template_container').style.top = document.getElementById('winchm_template_top').offsetHeight + 'px';
}

function d_onbeforeprint(){
document.getElementById('winchm_template_container').style.width = 'auto';
document.getElementById('winchm_template_container').style.height = 'auto';
}

function d_onafterprint(){
d_onresize();
}

if(!isMobile()){

window.onload = d_onresize;
window.onresize = d_onresize;
window.onbeforeprint = d_onbeforeprint;
window.onafterprint = d_onafterprint;

document.write("<style>\n");
document.write("body {overflow: hidden;}\n");
document.write("#winchm_template_container {position: absolute;overflow: auto;top : 0px;right: 0px;bottom: 0px;left: 0px;}\n");
document.write("</style>\n");
}

</script>
</head>
    <body><script language="JavaScript" type="text/JavaScript">
function syn(){
if(parent.nav.tree){
 if(parent.nav.tree.loaded){
  parent.nav.tree.selectNode(13302);
 }else{
  setTimeout("syn()",500);
}
  }else{
  setTimeout("syn()",500);
  }}
if(parent!=self){
  setTimeout("syn()",100);
}else{
  parent.location.href = "../index.htm?page=XtremePropertyGrid~Enumerations~PropertyItemType_EN.html";
}
originalOnload = window.onload;
if(originalOnload==null){
window.onload = function(){parent.contentLoaded = true;};
}else{
window.onload = function(){originalOnload();parent.contentLoaded = true;};
}
</script> 


<div id="winchm_template_top">
	<div id="winchm_template_button"><A href="XtremePropertyGrid~Enumerations~PropertyItemFlags_EN.html" title="Previous topic"><img id="winchm_template_prev" alt="Previous topic" src="template2/btn_prev_n.gif" border="0"></a><A href="XtremePropertyGrid~Enumerations~PropertySort_EN.html" title="Next topic"><img id="winchm_template_next" alt="Next topic" src="template2/btn_next_n.gif" border="0"></a></div>
	<div id="winchm_template_navigation">Help &gt; 
<A href="welcome_screen.htm">Codejock ActiveX Controls v15.3</A> &gt; <A href="XtremePropertyGrid_P.html">Xtreme Property Grid</A> &gt; Enumerations &gt; </div>
	<div id="winchm_template_title">PropertyItemType Enumeration</div>
</div>
<div id="winchm_template_container">
	<div id="winchm_template_content"><div class=popupbubble id=dxseealsomenu><p id=dxseealsocontent><a href="#Bookmark12305">PropertyGridItem Type Property</a>
&nbsp;|&nbsp;<a href="#Bookmark12264">AddChildItem Method</a>
&nbsp;|&nbsp;<a href="#Bookmark12587">PropertyGridItemOption Object</a>
</p><!--DXMETADATA end --> 
        </div>
        <div id=pagetop>
            <div id=projectnamebanner>
                <table class=projectnametable cellspacing=0>
                    <tbody>
                        <tr>
                            <!--DXMETADATA start type="Literal" condition="childitems:itemtype=seealso" value="<td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td>"--><td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td><!--DXMETADATA end-->
                            <td>
                                <!--DXMETADATA start type="Phrase" Name="Product_Header" -->Xtreme Property Grid ActiveX Control v15.3<!--DXMETADATA end --> 
                            </td>
                            <td align=right>
                                <!--DXMETADATA start type="Variable" name="FeedbackLink" format="" --><!--DXMETADATA end --> 
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div id=pagetitlebanner>
                <h1 class=dxh1>
                <!--DXMETADATA start type="PageItemTitle" -->PropertyItemType Enumeration<!--DXMETADATA end --></h1>
            </div>
        </div>
        <div id=pagebody valign="bottom">
            <!--DXMETADATA start type="IsNew" format="<script>document.all.pagebody.className = 'newTopic'</script>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Description" source="Item" format="<h4 class=dxh4>$$Description$$</h4><p>%%description%%</p>" --><h4 class=dxh4>Description</h4><p>Specifies the type of a <A href="#Bookmark12260">PropertyGridItem</A>.</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="ENUM_MEMBER_LIST" namespace="enumeration member" source="Item" filter="" format="<h4 class=dxh4>$$Members$$</h4>%%filtereditemlist%%" --><h4 class=dxh4>Members</h4><TABLE CLASS="FilteredItemListTable" CellSpacing="0"><TR VALIGN="top"><TH width="30%">Member</TH><TH width="70%">Description</TH></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemString</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> of type <STRONG>String</STRONG>.</TD> </TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemNumber</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> of type <STRONG>Number</STRONG>. </TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemBool</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <STRONG>Boolean</STRONG>. </TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemColor</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> of type <STRONG>Color</STRONG>.</TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemFont</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> of type <A href="#Bookmark12521">PropertyGridItemFont</A>. </TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemDouble</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a&nbsp;<A href="#Bookmark12260">PropertyGridItem</A> of type <STRONG>Double</STRONG>.</TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemDate</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <A href="#Bookmark12420">PropertyGridItemDate</A>.</TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemPicture</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <STRONG>Picture</STRONG>.</TD></TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemEnum</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <STRONG>Enum</STRONG>.</TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemEnumFlags</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <STRONG>EnumFlags</STRONG>.&nbsp; This will create a Flags value item in&nbsp;the Property Grid control.</TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemCategory</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies&nbsp;the <A href="#Bookmark12260">PropertyGridItem</A> is a <A href="#Bookmark12150">Category</A>.</TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemMultilineString</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> that contains a multi line string.&nbsp; When using this property a dropdown button will appear next to the item text that when clicked will display a edit window with the entire line of text.</TD></TR>
<TR><TD CLASS=MemberNameCell WIDTH="30%"><strong>PropertyItemOption</strong></TD><TD CLASS="DescriptionCell" WIDTH="70%">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <A href="#Bookmark12587">PropertyGridItemOption</A>.</TD></TR>
</TABLE><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##REMARKS" format="<h4 class=dxh4>$$Remarks$$</h4><p>%%comment%%</p>" --><h4 class=dxh4>Remarks</h4><p><P><STRONG>PropertyItemEnum</STRONG>:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>A <STRONG>Enum</STRONG> item is used to display a list of constraints.&nbsp; This is very similar to a normal constraint list.&nbsp; The difference is that an <STRONG>Enum</STRONG> constraint list will return the <A href="#Bookmark12406">Data</A> of the constraint when&nbsp;selected, where a normal constraint wold return the&nbsp;<A href="#Bookmark12405">Caption</A> of the&nbsp;constraint.&nbsp; This means the <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;<A href="#Bookmark12306">Value</A> property will contains the <A href="#Bookmark12406">Data</A> of the constraint, <STRONG>not</STRONG> the <A href="#Bookmark12405">Caption</A> of the&nbsp;constraint.</P></BLOCKQUOTE>
<P><STRONG>PropertyItemEnumFlags</STRONG>:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>A flag item is used to combine multiple boolean values into a single item.&nbsp; When using a flag item, you must <A href="#Bookmark12414">add</A> <A href="#Bookmark12282">constraints</A><BR>to the flag item.&nbsp; Each <A href="#Bookmark12401">constraint</A> will have a value of <STRONG>TRUE</STRONG> or <STRONG>FALSE</STRONG>.&nbsp; The flag item will have an expand button that when clicked will display all boolean constraints for that item.&nbsp; The value of the flag item will be the sum of all the boolean constraints with a value of <STRONG>TRUE</STRONG>.<BR><BR>NOTE: Constraint values must be in powers of 2 for items of type <STRONG>PropertyItemEnumFlags</STRONG>.<BR><BR>In the <STRONG>PropertyItemEnumFlags</STRONG> example below, the flag item's initial value will be 9, this&nbsp;value is stored in the <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;<A href="#Bookmark12306">Value</A> property.&nbsp; The string value will&nbsp;be "[Windows 98; Windows 95]" and this value is stored in <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;<A href="#Bookmark12297">MaskedText</A>&nbsp;property.&nbsp; To set the value of an <STRONG>EnumFlags</STRONG> item, you must&nbsp;set the <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;<A href="#Bookmark12306">Value</A> property&nbsp;to the sum of one or more constraints.&nbsp; The string value is what is displayed to the user.<BR><BR><IMG src="Pictures/flags.gif"></P>
<P>&nbsp;</P></BLOCKQUOTE>
<P dir=ltr><STRONG>PropertyItemCategory</STRONG>:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P dir=ltr>Adding an item of type <STRONG>PropertyItemCategory</STRONG>&nbsp;to a category will a sub-category.&nbsp; This allows you to create nested categories.&nbsp; You can create as many sub-categories as you want.</P>
<P dir=ltr><BR><IMG src="Pictures/subcategory.gif" align=middle border=0></P>
<P dir=ltr>&nbsp;</P></BLOCKQUOTE>
<P dir=ltr><!--StartFragment --><STRONG>PropertyItemColor</STRONG>:&nbsp;</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P dir=ltr>Items of type <STRONG>PropertyItemColor </STRONG>are used to display and retrieve color values.&nbsp; Both the color and RGB numeric equivalent are displayed in the item.&nbsp; A "<STRONG>color picker</STRONG>" dialog will be displayed&nbsp;when&nbsp;the expand button is clicked.&nbsp; The <STRONG>color picker</STRONG> allows the user to choose any of the predefined colors, or&nbsp;they can define a custom color.&nbsp; The picture below displays the <STRONG>PropertyItemColor </STRONG>and the <STRONG>color picker</STRONG> that is displayed when the expand button is pressed.<BR><BR><BR><IMG src="Pictures/color.gif"></P>
<P dir=ltr>&nbsp;</P></BLOCKQUOTE>
<P dir=ltr><STRONG>PropertyItemDate</STRONG>:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P dir=ltr>Items of type <STRONG>PropertyItemDate</STRONG>&nbsp;include a built-in&nbsp;"<STRONG>date picker</STRONG>" that allows the user&nbsp;to choose the day, month, and year from an intuitive&nbsp;GUI.&nbsp; The date format can be changed using the <A href="#Bookmark12452">Format</A> property.<BR><BR><IMG src="Pictures/date.gif"></P>
<P dir=ltr>&nbsp;</P></BLOCKQUOTE>
<P dir=ltr><STRONG>PropertyItemFont</STRONG>:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P dir=ltr>Items of type&nbsp;<STRONG>PropertyItemFont</STRONG> include a built-in "<STRONG>font picker</STRONG>" that allows the user to select the color, font, style, size, and effects of a font.&nbsp; Both the color and the font information will be displayed in the property grid item after the "<STRONG>font picker</STRONG>" is closed.&nbsp; Note that the <A href="#Bookmark12542">color</A> property MUST be manually set before the font dialog can be used to edit the font color.&nbsp; It will be disabled until this property is set.<BR><BR><IMG src="Pictures/font.gif"></P>
<P dir=ltr>&nbsp;</P></BLOCKQUOTE>
<P dir=ltr><STRONG>PropertyItemPicture</STRONG>:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P dir=ltr>Items of type <STRONG>PropertyItemPicture </STRONG>will allow a picture to be loaded into a property grid item.&nbsp; The <A href="#Bookmark12306">Value</A> of the item needs to be set to the pointer&nbsp;of&nbsp;a picture object.&nbsp; Supported picture formats include bitmap (.bmp) files, icon (.ico) files, cursor (.cur) files,&nbsp;metafile (.wmf) files, enhanced metafiles (.emf), GIF (.gif) files, and JPEG (.jpg) files.&nbsp; The property grid item will display a small preview thumbnail of the loaded picture and will display the picture type.</P>
<P dir=ltr>&nbsp;</P>
<P dir=ltr><IMG src="Pictures/picture.gif"></P>
<P dir=ltr>&nbsp;</P></BLOCKQUOTE>
<P dir=ltr>&nbsp;</P></p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##EXAMPLEINTRO" format="<h4 class=dxh4>$$Example$$</h4><p>%%comment%%</p>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="INLINE_EXAMPLE" namespace="Example" source="Item" filter="type=inline" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$Example$$</h4>,format= %%%%filtereditemlist%%" --><h4 class=dxh4>Example</h4><DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[PropertyItemEnumFlags Sample (Visual Basic)]</SPAN>&nbsp;This sample illustrates how to add an item of type PropertyItemEnumFlags to your grid.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB"><font class='comment'>'*********************************************************************</font><BR/>
<font class='comment'>'   PropertyItemEnumFlags Example</font><BR/>
<font class='comment'>'*********************************************************************</font><BR/>
<font class='keyword'>Dim</font> Category <font class='keyword'>As</font> PropertyGridItem<BR/>
<BR/>
<font class='comment'>'Adds a Category with caption "Items" to the Property Grid</font><BR/>
<font class='keyword'>Set</font> Category = wndPropertyGrid.AddCategory(<font class='string'>&quot;Items&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> ItemFlags <font class='keyword'>As</font> PropertyGridItem<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds an items of type EnumFlags with a default value of 1 + 8 = 9 = [Windows 98; Windows 95]</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> ItemFlags = Category.AddChildItem(PropertyItemEnumFlags, <font class='string'>&quot;Flags&quot;</font>, 1 + 8)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds a constraint that will set all items TRUE or FALSE, note the value of the constraint is the sum</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'of all the other constraints. This item will also be updated when the values of the other constraints</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'have changed.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemFlags.Constraints.Add <font class='string'>&quot;All Windows&quot;</font>, 1 + 2 + 4 + 8 + 16 + 32<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds some constraint that can have a value of TRUE or FALSE</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemFlags.Constraints.Add <font class='string'>&quot;Windows 98&quot;</font>, 1<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemFlags.Constraints.Add <font class='string'>&quot;Windows 2000&quot;</font>, 2<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemFlags.Constraints.Add <font class='string'>&quot;Windows XP&quot;</font>, 4<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemFlags.Constraints.Add <font class='string'>&quot;Windows 95&quot;</font>, 8<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemFlags.Constraints.Add <font class='string'>&quot;Windows NT&quot;</font>, 16<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemFlags.Constraints.Add <font class='string'>&quot;Windows 2003&quot;</font>, 32<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'This changes the value of the flag item to 21 and the string</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'caption to [Windows 98; Windows XP; Windows NT]</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemFlags.Value = 21<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Returns the sum of all true constraints</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;Debug.<font class='keyword'>Print</font> <font class='string'>&quot;Flags Item Value = &quot;</font> & ItemFlags.Value<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Returns a string containing the text of all true constraints</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;Debug.<font class='keyword'>Print</font> <font class='string'>&quot;Flags Item String = &quot;</font> & ItemFlags.MaskedText<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
</CODE></TD></TR></TABLE></DIV></DIV>
<DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[PropertyItemEnum Sample (Visual Basic)]</SPAN>&nbsp;This sample illustrates how to add an item of type PropertyItemEnum to your grid.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB"><font class='comment'>'*********************************************************************</font><BR/>
<font class='comment'>'   PropertyItemEnumFlags Example</font><BR/>
<font class='comment'>'*********************************************************************</font><BR/>
<font class='keyword'>Dim</font> Category <font class='keyword'>As</font> PropertyGridItem<BR/>
<BR/>
<font class='comment'>'Adds a Category with caption "Items" to the Property Grid</font><BR/>
<font class='keyword'>Set</font> Category = wndPropertyGrid.AddCategory(<font class='string'>&quot;Items&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> ItemEnum <font class='keyword'>As</font> PropertyGridItem<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds a PropertyItemEnum item with a caption of "Enum" and an initial value of 2</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'This will cause the constraint with a value of 2 to be selected</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> ItemEnum = Category.AddChildItem(PropertyItemEnum, <font class='string'>&quot;Enum&quot;</font>, 2)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds some constraints along with a Data value</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemEnum.Constraints.Add <font class='string'>&quot;Windows 98&quot;</font>, 1<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemEnum.Constraints.Add <font class='string'>&quot;Windows 2000&quot;</font>, 2<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemEnum.Constraints.Add <font class='string'>&quot;Windows XP&quot;</font>, 3<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Returns the Data value of the constraint selected</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;Debug.<font class='keyword'>Print</font> <font class='string'>&quot;Enum Item Value =&quot;</font> & ItemEnum.Value<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Returns the String of the constraint selected</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;Debug.<font class='keyword'>Print</font> <font class='string'>&quot;Enum Item String =&quot;</font> & ItemEnum.MaskedText<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
</CODE></TD></TR></TABLE></DIV></DIV>
<DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[PropertyItemCategory Sample (Visual Basic)]</SPAN>&nbsp;This sample illustrates how to add an item of type PropertyItemCategory to your grid.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB"><font class='comment'>'*********************************************************************</font><BR/>
<font class='comment'>'   PropertyItemCategory Example</font><BR/>
<font class='comment'>'*********************************************************************</font><BR/>
<BR/>
<font class='keyword'>Dim</font> Category <font class='keyword'>As</font> PropertyGridItem, ItemAppearance <font class='keyword'>As</font> PropertyGridItem<BR/>
<font class='keyword'>Dim</font> FontAppearance <font class='keyword'>As</font> PropertyGridItem<BR/>
<BR/>
<font class='comment'>'Adds a Category with caption "Document Settings" to the Property Grid</font><BR/>
<font class='keyword'>Set</font> Category = wndPropertyGrid.AddCategory(<font class='string'>&quot;Document Settings&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds a sub-category called "Appearance" to the "Document Settings" category.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> ItemAppearance = Category.AddChildItem(PropertyItemCategory, <font class='string'>&quot;Appearance&quot;</font>, <font class='string'>&quot;&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds a child item to the "Appearance" Category.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> FontAppearance = ItemAppearance.AddChildItem(PropertyItemFont, <font class='string'>&quot;Window Font&quot;</font>, <font class='keyword'>Me</font>.Font)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds child items to the "Window Font" item.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FontAppearance.AddChildItem PropertyItemBool, <font class='string'>&quot;Bold&quot;</font>, <font class='keyword'>Me</font>.Font.Bold<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FontAppearance.AddChildItem PropertyItemBool, <font class='string'>&quot;Italic&quot;</font>, <font class='keyword'>Me</font>.Font.Italic<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FontAppearance.AddChildItem PropertyItemBool, <font class='string'>&quot;Underline&quot;</font>, <font class='keyword'>Me</font>.Font.Underline<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FontAppearance.AddChildItem PropertyItemBool, <font class='string'>&quot;Strikethrough&quot;</font>, <font class='keyword'>Me</font>.Font.Strikethrough<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FontAppearance.AddChildItem PropertyItemString, <font class='string'>&quot;Name&quot;</font>, <font class='keyword'>Me</font>.Font.Name<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FontAppearance.AddChildItem PropertyItemNumber, <font class='string'>&quot;Weight&quot;</font>, <font class='keyword'>Me</font>.Font.Weight<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
</CODE></TD></TR></TABLE></DIV></DIV>
<DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[PropertyItemColor Sample (Visual Basic)]</SPAN>&nbsp;This sample illustrates how to add an item of type PropertyItemColor to your grid.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB"><font class='comment'>'*********************************************************************</font><BR/>
<font class='comment'>'   PropertyItemColor Example</font><BR/>
<font class='comment'>'*********************************************************************</font><BR/>
<font class='keyword'>Dim</font> Category <font class='keyword'>As</font> PropertyGridItem<BR/>
<BR/>
<font class='comment'>'Adds a Category with caption "Document Settings" to the Property Grid</font><BR/>
<font class='keyword'>Set</font> Category = wndPropertyGrid.AddCategory(<font class='string'>&quot;Document Settings&quot;</font>)<BR/>
<BR/>
<font class='comment'>'Adds a color item to the "Document Settings" category.</font><BR/>
Category.AddChildItem PropertyItemColor, <font class='string'>&quot;ColorItem&quot;</font>, RGB(20, 20, 30)<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
</CODE></TD></TR></TABLE></DIV></DIV>
<DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[PropertyItemFont Sample (Visual Basic)]</SPAN>&nbsp;This sample illustrates how to add an item of type PropertyItemFont to your grid.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB"><font class='comment'>'*********************************************************************</font><BR/>
<font class='comment'>'   PropertyItemFont Example</font><BR/>
<font class='comment'>'*********************************************************************</font><BR/>
<font class='keyword'>Dim</font> Category <font class='keyword'>As</font> PropertyGridItem<BR/>
<BR/>
<font class='comment'>'Adds a Category with caption "Items" to the Property Grid</font><BR/>
<font class='keyword'>Set</font> Category = wndPropertyGrid.AddCategory(<font class='string'>&quot;Items&quot;</font>)<BR/>
<BR/>
<font class='comment'>'Adds a PropertyGridItem that will display the currently selected font, a</font><BR/>
<font class='comment'>'button is added to the item that will display a Font Chooser dialog when clicked.</font><BR/>
<font class='keyword'>Set</font> Item = Category.AddChildItem(PropertyItemFont, <font class='string'>&quot;FontItem&quot;</font>, <font class='keyword'>Me</font>.Font)<BR/>
<BR/>
<font class='comment'>'The color property must manually be set to enable the color property to be selected in the</font><BR/>
<font class='comment'>'Font Chooser dialog, this must be done even is you are setting the color to black</font><BR/>
Item.Color = vbRed<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
</CODE></TD></TR></TABLE></DIV></DIV>
<DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[PropertyItemDate Sample (Visual Basic)]</SPAN>&nbsp;This sample illustrates how to add an item of type PropertyItemDate to your grid.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB"><font class='comment'>'*********************************************************************</font><BR/>
<font class='comment'>'   PropertyItemDate Example</font><BR/>
<font class='comment'>'*********************************************************************</font><BR/>
<font class='keyword'>Dim</font> DateItem <font class='keyword'>As</font> PropertyGridItemDate<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds a date item with an initial date of 01/31/2005</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> DateItem = Category.AddChildItem(PropertyItemDate, <font class='string'>&quot;DateItem&quot;</font>, <font class='string'>&quot;01/31/2005&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Sets date format to MM/DD/YYYY</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;DateItem.Format = <font class='string'>&quot;%m%d%Y&quot;</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Returns the currently set date formated with the mask MM/DD/YYYY</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;Debug.<font class='keyword'>Print</font> <font class='string'>&quot;Currently set date (MM/DD/YYYY): &quot;</font> & DateItem.Value<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Returns the currently set date without a format mask</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;Debug.<font class='keyword'>Print</font> <font class='string'>&quot;Unformated date (MMDDYYYY): &quot;</font> & DateItem.MaskedText<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Returns the date using the Month, Day, and Year properties</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;Debug.<font class='keyword'>Print</font> <font class='string'>&quot;Current Date: &quot;</font> & DateItem.Month & <font class='string'>&quot;/&quot;</font> & DateItem.Day & <font class='string'>&quot;/&quot;</font> & DateItem.Year<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
</CODE></TD></TR></TABLE></DIV></DIV>
<DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[PropertyItemPicture Sample (Visual Basic)]</SPAN>&nbsp;This sample illustrates how to add an item of type PropertyItemPicture to your grid.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB"><font class='comment'>'*********************************************************************</font><BR/>
<font class='comment'>'   PropertyItemPicture Example</font><BR/>
<font class='comment'>'*********************************************************************</font><BR/>
<font class='keyword'>Dim</font> Category <font class='keyword'>As</font> PropertyGridItem<BR/>
<font class='keyword'>Dim</font> PictureItem <font class='keyword'>As</font> PropertyGridItem<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds a Category with caption "Items" to the Property Grid</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Category = wndPropertyGrid.AddCategory(<font class='string'>&quot;Items&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds an item if type PropertyItemPicture to the grid.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> PictureItem = Category.AddChildItem PropertyItemPicture, <font class='string'>&quot;PictureItem&quot;</font>, <font class='string'>&quot;&quot;</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> AppIcon <font class='keyword'>As</font> Picture<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Loads an icon</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> AppIcon = LoadPicture(App.Path + <font class='string'>&quot;\Project1.ico&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Set the value of PictureItem to the icon loaded into AppIcon</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'This will be the picture displayed in the property grid item.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;PictureItem.Value = AppIcon<BR/>
<BR/>
<BR/>
<BR/>
<BR/>
</CODE></TD></TR></TABLE></DIV></DIV>
<!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="seealso" source="Item" filter="" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$See_Also$$</h4><p id=dxseealsocontent>%%filtereditemlist%%</p>" --><h4 class=dxh4>See Also</h4><p id=dxseealsocontent><a href="#Bookmark12305">PropertyGridItem Type Property</a>
&nbsp;|&nbsp;<a href="#Bookmark12264">AddChildItem Method</a>
&nbsp;|&nbsp;<a href="#Bookmark12587">PropertyGridItemOption Object</a>
</p><!--DXMETADATA end --><!--DXMETADATA start type="Variable" name="CopyrightNotice" format="><!--DXMETADATA end --></div></div>	
	<div id="winchm_template_footer">Copyright &copy; 2018. All rights 
reserved. (To change the copyright info, just edit it in template.)</div>
</div>

</body>
</html>

